<template>
  <div
    v-if="showPriceZeroDialog"
    class
    style="
      position: fixed;
      top: 0;
      left: 0;
      z-index: 999;
      width: 100%;
      height: 100vh;
      background-color: rgba(0, 0, 0, 0.4);
    "
  >
    <div
      class
      style="width: 100%; position: relative; height: 100%; display: flex; justify-content: center; align-items: center"
    >
      <div
        style="width: 50%; background: #ffffff; padding: 30px; font-size: 18px; color: #333333; border-radius: 8px"
      >
        <div style="display: flex; align-items: center; justify-content: space-between">
          <div style="width: 100%">
            <div style>{{ priceZeroGoodsData.name }}，是否继续?</div>
          </div>
        </div>
        <div
          style="
            display: flex;
            justify-content: flex-end;
            width: 100%;
            float: right;
            margin-top: 50px;
          "
        >
          <el-button size="mini" style="width: 60px;" @click="clickSureOne">是</el-button>
          <el-button size="mini" style="margin-left:20px;width: 60px;" @click="clickCancel">否</el-button>
          <!-- <div
            style="
              color: #3cb69f;
              font-size: 17px;
              width: 55px;
              height: 30px;
              display: flex;
              justify-content: center;
              align-items: center;
              border-radius: 8px;
            "
            @click="clickSureOne"
          >
            是
          </div>-->
          <!-- <div
            style="
              color: #3cb69f;
              font-size: 17px;
              width: 55px;
              height: 30px;
              display: flex;
              justify-content: center;
              align-items: center;
              border-radius: 8px;
              margin-left: 50px;
            "
            @click="clickSureAll"
          >全是</div>
          <div
            style="
              color: #3cb69f;
              font-size: 17px;
              width: 55px;
              height: 30px;
              display: flex;
              justify-content: center;
              align-items: center;
              border-radius: 8px;
              margin-left: 50px;
            "
            @click="clickCancel"
          >否</div>-->
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'DialogPriceZero',
  props: {
    showPriceZeroDialog: {
      type: Boolean,
      default: false,
    },
    priceZeroGoodsData: {
      type: Object,
      default: () => { },
    },
  },
  data () {
    return {

    }
  },
  methods: {
    clickSureOne () {
      // this.$emit('clickSureOne')
      this.$emit('priceZeroCallback', {
        type: 'once',
        ...this.priceZeroGoodsData
      })
    },
    clickSureAll () {
      // this.$emit('clickSureAll')
      this.$emit('priceZeroCallback', {
        type: 'all'
      })
    },
    clickCancel () {
      // this.$emit('clickCancel')
      this.$emit('priceZeroCallback', {
        type: 'cancel'
      })
    }
  },
}
</script>